import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
	  bread:[],
	  slideMenus:[],
	  user:JSON.parse(window.sessionStorage.getItem('rightlist'))||'{}'
  },
  mutations: {
	  getslideMenus(state,preload){
	  		  state.slideMenus = preload
	  },
	  addBread (state, bread) {
	    state.bread = bread
	  },
	  getLogin(state,preload){
		state.user = preload
		window.sessionStorage.setItem('rightlist',JSON.stringify(preload))
	  }
  },
  getters:{
	  
  },
  actions: {
  }
})
